package com.ccb.sc.common.modules.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ccb.sc.common.entity.BaseEntity;
import com.ccb.sc.common.enums.AuditStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * <p>
 * 订单退款表
 * </p>
 *
 * @author ken
 * @since 2020-10-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_order_refund")
public class OrderRefund extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 退货退款id
     */
    @TableField("order_return_id")
    private Long orderReturnId;

    /**
     * 订单id
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 用户id
     */
    @TableField("member_id")
    private Long memberId;

    /**
     * 支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    /**
     * 积分
     */
    @TableField("points")
    private Integer points;

    /**
     * 钱包金额
     */
    @TableField("wallet_amount")
    private BigDecimal walletAmount;

    @TableField("reason")
    private String reason;

    @TableField("memo")
    private String memo;

    @TableField("admin_memo")
    private String adminMemo;

    /**
     * 退款支付方式
     */
    @TableField("payment_method")
    private String paymentMethod;

    /**
     * 支付插件ID
     */
    @TableField("payment_plugin_id")
    private String paymentPluginId;

    /**
     * 审核状态：WAITAUDIT(1, "未审核"),AUDITED(2,"申请通过"),REFUSED(3,"已拒绝"),CANCELED(4,"已取消")
     */
    @TableField("status")
    private AuditStatus status;

    /**
     * 外部交易号
     */
    @TableField("trade_no")
    private String tradeNo;

}
